package com.galaxy.device.service;

import com.galaxy.common.mybatis.core.page.PageQuery;
import com.galaxy.common.mybatis.core.page.TableDataInfo;
import com.galaxy.device.domain.CheckStock;
import com.galaxy.device.domain.bo.DeviceStockBo;
import com.galaxy.device.domain.bo.OrderBo;
import com.galaxy.device.domain.vo.DeviceStockVo;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 设备库存Service接口
 */
public interface IDeviceStockService {

    /**
     * 查询设备库存列表
     */
    TableDataInfo<DeviceStockVo> queryPageList(DeviceStockBo bo, PageQuery pageQuery);

    /**
     * 查询设备库存详细信息
     */
    DeviceStockVo queryById(Long id);

    /**
     * 新增设备库存
     */
    Boolean insertByBo(DeviceStockBo bo);

    /**
     * 修改设备库存
     */
    Boolean updateByBo(DeviceStockBo bo);

    /**
     * 校验并批量删除设备库存信息
     */
    Boolean deleteWithValidByIds(List<Long> ids, Boolean isValid);

    /**
     * 查询设备库存预警列表
     */
    TableDataInfo<DeviceStockVo> queryAlertList(DeviceStockBo bo, PageQuery pageQuery);

    /**
     * 批量更新设备库存
     */
    Boolean batchUpdate(List<DeviceStockBo> boList);

    List<DeviceStockVo> getDevice(Long productId);

    Boolean checkStock(List<CheckStock> checkStock, OrderBo orderBo);

    Boolean updateStock(List<CheckStock> checkStockList);
}
